Zero struct tm on timestamp read so if time tag is malformed, we don't have hour...
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 3 Aug 2006 20:42:13 +0000 (20:42 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 3 Aug 2006 20:42:13 +0000 (20:42 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@2281 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/gpx.c

index b6bbdfe132081f21e636d4032449d81a0ac5a364..07f3ecdd61a2a464088c028794de6c865217d3b6 100644 (file)
@@ -735,6 +735,8 @@ xml_parse_time( const char *cdatastr )
        struct tm tm;
        time_t rv = 0;
        char *timestr = xstrdup( cdatastr );
+
+       memset(&tm, 0, sizeof(tm));
        
        offsetstr = strchr( timestr, 'Z' );
        if ( offsetstr ) {